		**********************************************************
		** File: cleaning_wgi.do								**
		** Paper: Human Trafficking Indicators: A New Dataset	**
		** Author: Richard Frank								**
		** Date: July 11, 2021									**
		** Task: Cleaning World Governance Indicators			**
 		**********************************************************
 

	clear
	version 16.1
	set seed 1234
	
	cd "~"
	
	** data from: https://info.worldbank.org/governance/wgi/
	
	use "wgidataset.dta"
	rename countryname Country
	run "cow.do"
	tab Country if ccode==0
	drop if ccode==0
	drop code
	rename Country country
	duplicates report ccode year
	sort ccode year
	save wgi_2019.dta, replace
	
	keep country year ccode pve vae rle
	label var pve "Political stability (WGI)"
	label var vae "Voice and accountability (WGI)"
	label var rle "Rule of Law (WGI)"
	
	save wgi_voice_stab.dta, replace
